#ifndef __2865031_OPTICALFLOW_H__
#define __2865031_OPTICALFLOW_H__

#include <iostream>
using namespace std;
#include "processor.h"

class OpticalFlow : public Processor
{
    protected:

        IplImage * u;
        IplImage * v;
        IplImage * res;
        IplImage * ex;
        IplImage * ey;
        IplImage * et;
        IplImage * t1;
        IplImage * t2;
        IplImage * uL;
        IplImage * vL;

        double max_error;
        unsigned int max_iter;
        float alpha2;
        float threshold;

        inline void estimateOpticalFlow(IplImage *);
        inline void estimateResult();

    public:

        OpticalFlow();
        ~OpticalFlow();
        OpticalFlow(const OpticalFlow &);
        OpticalFlow& operator=(const OpticalFlow &);

        virtual IplImage * init  (IplImage *);
        virtual IplImage * update(IplImage *);

};

#endif

